#define _CRT_SECURE_NO_WARNINGS 
#include <stdio.h>
#include <math.h>
int main()
{
	int n;
	scanf("%d", &n);
	int a[1000] = { 0 };
	int b[1000] = { 0 };
	scanf("%d", &a[0]);
	for (int i = 1; i < n; i++)
	{
		scanf("%d", &a[i]);
		if(abs(a[i] - a[i - 1])<=999)
		b[abs(a[i] - a[i - 1])] = 1;
	}
	for (int i = 1; i <= n - 1; i++)
	{
		if (b[i] == 0)
		{
			printf("Not jolly");
			break;
		}
		if (i == n - 1)
			printf("Jolly");
	}
	return 0;
}